package com.yc.controller;

import com.yc.bean.Coupon;
import com.yc.model.ResponseResult;
import com.yc.service.CouponBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zwei
 * @create 2024-10-22 16:59
 */
@RestController
@RequestMapping("/food")
public class CouponController {
    @Autowired
    private CouponBiz couponBiz;
    @GetMapping("/getCoupon")
    public ResponseResult getCoupon(){
        List<Coupon>list=couponBiz.find();
        return ResponseResult.ok().setData(list);
    }
}
